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U	STKP.2
		FSTKPB1	EQU	STKP.1
		FSTKPB0	EQU	STKP.0
	P0UR	EQU	0E0H
	P4UR	EQU	0E4H
	P5UR	EQU	0E5H
	@YZ	EQU	0E7H
	STK3L	EQU	0F8h
	STK3H	EQU	0F9h
	STK2L	EQU	0FAh
	STK2H	EQU	0FBh
	STK1L	EQU	0FCh
	STK1H	EQU	0FDh
	STK0L	EQU	0FEh
	STK0H	EQU	0FFh
@RST_WDT	macro		
 		   MOV  A, #0x5A
		   B0MOV  WDTR, A
	endm

SleepMode	macro	
		B0BSET	FCPUM0
	endm

GreenMode	macro	
		B0BSET	FCPUM1
		NOP
		NOP
	endm

SLowMode	macro	
		B0BSET	FCLKMD
		B0BSET	FSTPHX
	endm

Slow2Normal	macro	
		B0BCLR	FSTPHX
		NOP
		NOP
		NOP
		B0BCLR	FCLKMD
	endm

endif
